package com.foreveredu.propms.persist;

import java.util.List;

import com.foreveredu.propms.domain.Bill;
import com.foreveredu.propms.domain.ChargeItem;
import com.foreveredu.propms.domain.ChargeRecord;
import com.foreveredu.propms.domain.House;

public interface IChargeRecordDao extends IDao<ChargeRecord, Integer> {
	
	/*
	 * 根据房产和日期查找收费记录
	 */
	List<ChargeRecord> findChargeRecordByHouseAndDate(House house, int year, int month);
	
	/*
	 * 计算房产在某日期（月份）的收费记录
	 */	
	void countChargeRecordForHouseAndDate(House house, int year, int month);
	
	//查询某账单所包含的收费记录列表
	List<ChargeRecord> findByBill(Bill bill);

	//查询某房产的收费项目是否已收费
	ChargeRecord findByHouseAndChargeItem(House house, ChargeItem item);
	
	//查询某房产的收费项目是否在当前年度已收费
	List<ChargeRecord> findByHouseAndChargeItemInYear(House house, ChargeItem item,
			int year);
	
}
